﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;

namespace LantixLBSServer.Web.Common.Helper
{
    public class CDateStampEx
    {
        public static DateTime ConvertToDateTime(string dateTime)
        {
            if (dateTime == "10101000000")
            {
                return DateTime.MinValue;
            }
            return new DateTime(
                                            int.Parse(dateTime.Substring(0, 4)),
                                            int.Parse(dateTime.Substring(4, 2)),
                                            int.Parse(dateTime.Substring(6, 2)),
                                            int.Parse(dateTime.Substring(8, 2)),
                                            int.Parse(dateTime.Substring(10, 2)), 0);
        }
        public static DateTime ConvertToDateTime(long dateTime)
        {
            return ConvertToDateTime(dateTime.ToString());
        }
    }
}